#include "ZerglingControllerStructs.h"

SLine::SLine(int x1, int y1, int x2, int y2)
{
	this->x1 = x1;
	this->x2 = x2;
	this->y1 = y1;
	this->y2 = y2;
	this->slope = 0.0f;
	this->intercept = 0.0f;
	//Vertical line case
	if ((x2-x1) == this->slope) {
		this->slope = NaN;
		this->intercept = (float) x1;
	} else if ((y2-y1) == this->slope) {
		this->slope = 0;
		this->intercept = NaN;
	} else {
		this->slope = (float) (y2-y1) / (float) (x2-x1);
		this->intercept = (float) y2 - this->slope * (float) x2;
	}
}

SQuadValues::SQuadValues(float a, float b, float c)
{
	this->a = a;
	this->b = b;
	this->c = c;
}